using System.Collections.Generic;

namespace Limestone
{
    public interface ITemplateProvider
    {
        IStorage Storage { get; set; }

        /// <summary>
        /// Loads and returns a full template object.
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        IPageTemplate Get(string path);

        /// <summary>
        /// persists the template to disc
        /// </summary>
        /// <returns></returns>
        IPageTemplate Save(IPageTemplate template);

        IEnumerable<IPageTemplate> GetAll();
        void SyncPageWithTemplate(IPage page);

        /// <summary>
        /// Loads fieldsettings from the template and appends them to their respective field in the page
        /// </summary>
        /// <param name="page"></param>
        void AddFieldSettings(IPage page);
    }
}